<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
           class Person{
            constructor(name,age){
                this.name=name;
                this.age=age;
            }
            showName(){
                return '这是通过构造对象调用方法';
            }
             static show(){
                return '这是静态方法';
            }}
            let p1 =new Person('haha',18)
            console.log(p1.showName())

            console.log(Person.show)
            console.log(p1.show)//不能用

    </script>
</body>
</html>